const mongoose = require('mongoose');

mongoose.connect('mongodb://127.0.0.1:27017/carplus')

let conn = mongoose.connection;

conn.on('open', () => {
    console.log("MongoDB database connection established successfully,数据库连接成功");
})

conn.on('error', (error) => {
    console.log("Error in database connection", error);
})

module.exports = mongoose